﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

using Ylh.Data;
using Ylh.ElvModel;
using System.Data;

namespace Ylh.ElvBLL
{
    class TbSmDbEvlBLL
    {
        string Constr = ConfigurationManager.ConnectionStrings["ConStr"].ToString();

        /// <summary>
        /// 方法只用于第一次获取数据库链接字符串用
        /// </summary>
        /// <returns></returns>
        public string GetConnectionStr()
        {
            TbSmDb db = new TbSmDb();
            OQLWhere where = new OQLWhere(db);
            where.SelectColumn = new ColumnOpera(db).CreateSelectColumn(db.DbConnection);
            DataTable dt = TbSmDb.Select(where, Constr);
            return dt.Rows[0]["DbConnection"].ToString();
        }
    }
}
